Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gzip logs as per default log4j2 config #1312

Merged
merged 3 commits into from
Sep 3, 2021
Merged

gzip logs as per default log4j2 config #1312

merged 3 commits into from
Sep 3, 2021

Conversation

mstormi
Copy link
Contributor

@mstormi mstormi commented Sep 1, 2021

Primarily to save on disk space or actually on RAM on openHABian-on-Raspi which has this in (Z)RAM

Also explicitly defined the number of logs := 7 so people know how to change that if they want to.

Fixes: openhab/openhabian#1575

Signed-off-by: Markus Storm markus.storm@gmx.net

Signed-off-by: Markus Storm <markus.storm@gmx.net>
@wborn
Copy link
Member

wborn commented Sep 3, 2021

I'm fine with the changes, but we probably also want to apply them to upgrades and not only new installations.

So it needs an entry for 3.2.0 in update.lst similar to:

DEFAULT;$OPENHAB_USERDATA/etc/log4j2.xml

@wborn
Copy link
Member

wborn commented Sep 3, 2021

I also like to keep the log4j2.xml we use in Eclipse synced with what is used in production as much as possible. So can you also update https://github.com/openhab/openhab-distro/blob/main/launch/app/runtime/log4j2.xml ?

Signed-off-by: Markus Storm <markus.storm@gmx.net>
@mstormi
Copy link
Contributor Author

mstormi commented Sep 3, 2021

So it needs an entry for 3.2.0 in update.lst similar to:

sorry I didn't catch that. Where would that entry need to be made ? (probably easiest when you do yourself, maintainer edit is enabled).
The sync addition I've made.

@wborn
Copy link
Member

wborn commented Sep 3, 2021

Good good 👍

Just add it to 3.2.0 in the [[PRE]] section, like this :

[[PRE]]
[2.2.0]
DEFAULT;$OPENHAB_USERDATA/etc/org.ops4j.pax.logging.cfg

[3.0.0]
DEFAULT;$OPENHAB_USERDATA/etc/log4j2.xml
DEFAULT;$OPENHAB_USERDATA/etc/org.ops4j.pax.logging.cfg

[3.2.0]
DEFAULT;$OPENHAB_USERDATA/etc/log4j2.xml

Signed-off-by: Markus Storm <markus.storm@gmx.net>
@mstormi
Copy link
Contributor Author

mstormi commented Sep 3, 2021

ok

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@wborn wborn merged commit dd6712a into openhab:main Sep 3, 2021
@wborn wborn added the enhancement An enhancement or new feature label Sep 3, 2021
@wborn wborn added this to the 3.2 milestone Sep 3, 2021
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/extensive-logging-of-binding-turns-filesystem-to-read-only/147405/8

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/extensive-logging-of-binding-turns-filesystem-to-read-only/147405/20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specify logging in new XML format
3 participants